Closed Bug 402132 Opened 18 years ago Closed 17 years ago

Multiple Drafts saved on Gmail IMAP during writing process, none deleted.

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: costela, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [status: fixed by gmail])

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.8) Gecko/20071004 Iceweasel/2.0.0.8 (Debian-2.0.0.8-1) Build Identifier: Thunderbird 2.0.0.6 (20071008) While composing an email, it will get saved many different times to the remote Gmail IMAP Drafts folder, when configured to do so. None of those copies will get removed (or marked as deleted) upon sending. A possible solution would be to maintain the same Message-ID during writing, but I'm not sure this would solve the not deleting issue. Reproducible: Always Steps to Reproduce: 1. Set draft folder to [Gmail]/Draft 2. Write a message 3. Wait for one draft save interval 4. Write some more 5. Wait for one draft save interval, so that two different drafts get saved 6. Send the message Actual Results: Many different drafts get saved and none deleted after actually sending the message (as many as the number of "edit/autosave draft" cycles) Expected Results: A single message saved during message writing, which gets deleted upon sending.
(In reply to comment #0) > Gmail IMAP > None of those copies will get removed (or marked as deleted) upon sending. "Gmail IMAP" is not usual IMAP server. Gmail IMAP is "Web Mail which can be accessed via IMAP protocol", even if it's "a fairly complete implementation of IMAP". Read Gmail Help Center articles. http://mail.google.com/support/bin/topic.py?topic=12760 http://mail.google.com/support/bin/answer.py?answer=78761&topic=12762 Because "save in Drafts" consists of add(append) of draft mail and delete of previous/last draft mail, following article probably explains what happens on you correctly. What happens when I delete a message? ( http://mail.google.com/support/bin/answer.py?answer=78755&topic=12762 ) > deleting a message simply removes that folder's label from the message, > including the label identifying the message as being in your inbox. "Expunge" maybe is required. What will happen when "compact folder" or "Expunge on quit option is enabled and restart Tb"?
I don't think this explanation accounts for what's happening, because if that was the case, the duplicated messages wouldn't be showing up in my '[Gmail]/Drafts' folder, instead they'd be dumped in the 'All Mail' catch-all label. I tried it with the expunge and compact approaches... But assuming Thunderbird actually IS issuing a DELETE and Gmail somehow is just not acting according to its own documentation, would it make sense for this delete operation to be defined by the account config? Moving the old draft to the Trash folder instead of deleting it directly via IMAP, for instance? IMHO this would be a sensible compromise, even if this config was just accessible through the advanced config interface. FTR: After reading RFC 2822 a little deeper[0] I realize my suggestion to make use of a Gmail "feature" to overwrite drafts by using the same Message-ID actually a terrible idea. Cheers
Get IMAP protocol log to see real protocol level flow. > http://kb.mozillazine.org/Session_logging_for_mail/news > http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#imap > http://www.mozilla.org/projects/netlib/http/http-debugging.html > http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Deployment_Guide-en-US/sso-ov.html#sso-config-firefox-troubleshoot Following parameter is convenient for your purpose. setenv NSPR_LOG_MODULES imap:5,smtp:5 Enabling of next option is also useful. > Account Settings/Copies&Folders > Show confirmation dialog when message are saved If Tb's fault is involved then log analysis by developer is required, attach log file to this bug (text/plain; if size is accepted). Please don't paste long log data in bug.
Check following setting for your current choice of behavior when delete of a mail. > Account Settings/Server Settings > When I delete a message > a. Move it to the Trash folder > b. Mark it as deleted > c. Remove it immediately
I'm aware of this setting, but as I said, I don't think Thunderbird is respecting it when dealing with deleting old drafts, as demonstrated in this snip of log, found in the log attachment I just added: 1208023376[2c61300]: 1aaca60:imap.gmail.com:S-[Gmail]/Drafts:ProcessCurrentURL:imap://costela@imap.gmail.com:993/addmsgflags%3EUID%3E/%5BGmail%5D/Drafts%3E0%3E8: = currentUrl 1208023376[2c61300]: 1aaca60:imap.gmail.com:S-[Gmail]/Drafts:SendData: 30 uid store 0 +Flags (\Deleted) As an aside, I noticed it's issuing the STORE command with a sequence set of 0, which strikes me as odd. This command is failing and I can't tell if it's a Thunderbird flaw for not fetching the correct sequence set, or Gmail IMAP for not supplying it when it should (probably Gmail's). The attached log demonstrates the following behavior: 1. begin writing a message, saving as draft 2. writing more, saving again 3. writing yet more, saving again 4. idling a while, saving again 5. sending it 6. manually deleting all 4 saved drafts From what I could see, the manual delete issues a "COPY 363:366", while the first 4 saves simply issue "STORE 0 +FLAGS (/Deleted)". To make things clear, I'm not implying it's purely a Thunderbird problem, I just want to find a possible way to mitigate it. Cheers and thanks for the help
This log snip demonstrates the following actions: 1. begin writing a message, saving as draft 2. writing more, saving again 3. writing yet more, saving again 4. idling a while, saving again 5. sending it 6. manually deleting all 4 saved drafts
Doesn't seem to leave multiple drafts for me, only one (which I edited after restart), but that one oddly shows up in tb, but not through the web ui. Even after restart. Tested on linux/trunk.
Are you sure the Draft is being saved in [Gmail]/Drafts? Perhaps it's still being saved locally? That would explain both the lack of copies and the lack of server-side draft appearing. Cheers and thanks for the input!
Doh! Thanks Leo! Got it set up correctly now and I can confirm drafts aren't deleted after send.
Status: UNCONFIRMED → NEW
Ever confirmed: true
FYI. >(Required set up for Drafts folder) > Why aren't my Drafts showing up in my web Gmail account? > http://mail.google.com/support/bin/answer.py?answer=78773&topic=12763 >(Minimum knowledge on Gmail IMAP necessary to judge "Tb's bug or not") > How do actions sync in IMAP? > http://mail.google.com/support/bin/answer.py?answer=77657&topic=12762
(In reply to comment #5) > 30 uid store 0 +Flags (\Deleted) Can you see "STORE command with a sequence set of 0" even when manual save? 0. Disable auto-save 1. Compose a mail, save as draft 2. Edit draft, and several times of manual save 3. Repeat step 2.
Yes. Actually, all saves but the last one in the log I sent are manual. The last one is the only one triggered by an automatic save. They all exhibit the same behavior, though - as I said - I couldn't judge by the logs whether that problem was caused by a bad reply from Gmail IMAP, or by a faulty assumption on TB's part. I won't be able to do it until next weekend, but I'll re-test and proofread the IMAP negotiations side-by-side with the RFC, to see if I can spot the culprit. Thanks for the input! Cheers
It looks like Thunderbird is trying to locate the UID for the new Draft by using a SEARCH command for the message-id: 25 uid SEARCH UNDELETED HEADER Message-ID 472B5C62.7040904@gmail.com Gmail does not support search by message-id, so nothing is returned, and TB cannot assign the UID. The later attempt to mark it deleted fails, due to the use of UID=0.
Sounds current restriction of Gmail IMAP. > http://mail.google.com/support/bin/answer.py?answer=78761&topic=12762 > Does Gmail support all IMAP features? > Gmail IMAP is a fairly complete implementation of IMAP, > but the following features are currently unsupported: >(snip) > * Searching arbitrary headers. Only some headers are available for searches: > From/CC/BCC/To/Subject. >(snip)
Reported to gmail as "technical issue".
This issue seems to have been resolved by Gmail. It's now correctly deleting the Drafts, and therefore probably accepting searches by Message-ID. No more use for this bug being open. Cheers
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
I can confirm that, works fine now. Let's mark it invalid though, as it's not our bug.
Resolution: FIXED → INVALID
Whiteboard: [status: fixed by gmail]
Attachment #287126 - Attachment mime type: text/x-log → text/plain
I still see this behaviour on a recent version of Thunderbird.
I started having this issue recently with Gmail+Thunderbird.
When I write emails, using Gmail IMAP as my account, the drafts aren't being saved in drafts, but are being sent to my inbox as new messages. Thus if I write a message that goes through 7 autosave cycles, I get those seven copies of the draft sent directly into my inbox. Macbook pro, Mavericks. I completely deleted TB from my system, reset my system with PRAM, and reinstalled a freshly downloaded TB. The problem went away for a few days but is back. Sometimes the drafts sent to my inbox delete themselves, sometimes I need to.
I have the exact same problem as the previous poster. I've been using Gmail IMAP for years (via Google Apps with my own non-gmail domain), but for about the past 6 months I've experienced the same problem as the poster of comment 22. If I start a draft with an email address filled in, then repeatedly save it as I edit it, I end up with a fresh copy of the latest revision in my inbox seconds after I save it. If I save it 10 times I end up with 10 duplicates in my inbox. If I don't fill in a recipient address until just before I send the final version I don't get duplicates. This never used to happen to me prior to about 6 months ago. Something is definitely goofy with either Thunderbird or Gmail. Maybe it has something to do with which draft folder I have my account set to save to? I've always had 2 different "Draft" folders under my IMAP account, 1 directly under my account's main "inbox" and another in my [Gmail] folder further down the list. My drafts are set to be saved in the non-Gmail folder. Perhaps I should change it to use the [Gmail] Drafts subfolder and see if anything changes?
Okay, I think I just solved the mystery -- sorry to all 40 of you who got cc-d on that last message and sorry again for this long-winded followup. The problem seems to be due to having more than 1 Drafts folder under my IMAP account. My account was set to save drafts to my top-level "Drafts" folder, rather than the [Gmail]-->Drafts folder. Saving the draft 5 times in quick succession resulted in 5 copies immediately appearing in my inbox. I switched my account to save drafts in the [Gmail]-->Drafts folder instead and then watched that folder closely as I saved a new draft in quick succession. A duplicate (revision) draft would appear and then the previous version would get deleted immediately, leaving only 1 draft in the Gmail Drafts folder, and no mystery drafts showed up in my inbox anymore. So, I'm not even sure why I have two different Drafts folders, but I think this obviously confuses Gmail as it adds a "Draft" label to each draft that isn't in the special "Gmail" drafts folder. I'm thinking that the duplicate drafts folder is a legacy of the old POP3 drafts folder from before I migrated all my mail to IMAP -- so maybe that's what's been happening with these other users who are reporting the same problem every few years? Anyway, the mystery appears to be solved for me at least.
Okay, Brett, thanks for checking on this. I looked at my settings in Gmail under "labels" and saw that I indeed have two draft folders. I deleted the Gmail IMAP draft folder, restarted Thunderbird, and the problem seems to have resolved itself.
Hi, I still have issues with the auto-saved drafts. In contrast to Brett and Leon, I suppose I have a different setting for the deletion of e-mails. Instead of "mark as deleted" or "delete immediately", I have "move to [Gmail]/Trash". That's because neither of the other settings works for me and even if it would, I actually want the move-to-trash behaviour (i.e. deleting means deleting everywhere to me, not only removing the label). So when I write an e-mail, some drafts are auto-saved, but they don't appear anywhere while I write the e-mail. The "main" draft is stored correctly in the "Drafts" folder, so that I can continue writing the e-mail in Gmail, if I want to. When I send or discard the e-mail, it is correctly moved to the sent folder and the "main" draft is removed. However, all the auto-saved drafts are "deleted" as well, which means that they appear as new e-mail in my "[Gmail]/Trash" folder, which is very annoying. Also, all other Gmail clients show those drafts as a part of the conversation, so that there's a long list I need to scroll over, until I can see the recipients response to my mail. I tried this Thunderbird extension (https://addons.mozilla.org/de/thunderbird/addon/auto-save-drafts-folders/) that lets you store your auto-saved drafts some place else, so that Google does not get them. While they are in fact stored in the right place, they get deleted to the "[Gmail]/Trash" as well, when I send the e-mail. So that's the same problem. This behaviour is really annoying since my drafts appear as "new mail" in my trash and in Thunderbird's popups and so on. And they clutter my conversation history. Is there any way to tell Thunderbird how to delete auto-saved drafts? I.e. make it ignore the default setting in the account settings and just delete those mails without telling the server about them?
(In reply to Philipp from comment #26) > Hi, > > I still have issues with the auto-saved drafts. In contrast to Brett and > Leon, I suppose I have a different setting for the deletion of e-mails. > Instead of "mark as deleted" or "delete immediately", I have "move to > [Gmail]/Trash". That's because neither of the other settings works for me > and even if it would, I actually want the move-to-trash behaviour (i.e. > deleting means deleting everywhere to me, not only removing the label). > > So when I write an e-mail, some drafts are auto-saved, but they don't appear > anywhere while I write the e-mail. The "main" draft is stored correctly in > the "Drafts" folder, so that I can continue writing the e-mail in Gmail, if > I want to. When I send or discard the e-mail, it is correctly moved to the > sent folder and the "main" draft is removed. However, all the auto-saved > drafts are "deleted" as well, which means that they appear as new e-mail in > my "[Gmail]/Trash" folder, which is very annoying. Also, all other Gmail > clients show those drafts as a part of the conversation, so that there's a > long list I need to scroll over, until I can see the recipients response to > my mail. > > I tried this Thunderbird extension > (https://addons.mozilla.org/de/thunderbird/addon/auto-save-drafts-folders/) > that lets you store your auto-saved drafts some place else, so that Google > does not get them. While they are in fact stored in the right place, they > get deleted to the "[Gmail]/Trash" as well, when I send the e-mail. So > that's the same problem. > > This behaviour is really annoying since my drafts appear as "new mail" in my > trash and in Thunderbird's popups and so on. And they clutter my > conversation history. > > Is there any way to tell Thunderbird how to delete auto-saved drafts? I.e. > make it ignore the default setting in the account settings and just delete > those mails without telling the server about them? EXACT same problem for me too.
This bug is still present with Thunderbird 31.6 please take care of it, it's really annoying. thanks
I confirm this worked for me. Server configuration: when I delete a message move it to [Gmail]--> Trash folder Folders and copies: Save message drafts in [Gmail]--> Draft folder And no more mysterious drafts appearing on my inbox... for now. (In reply to Brett Brewer from comment #24) > Okay, I think I just solved the mystery -- sorry to all 40 of you who got > cc-d on that last message and sorry again for this long-winded followup. The > problem seems to be due to having more than 1 Drafts folder under my IMAP > account. My account was set to save drafts to my top-level "Drafts" folder, > rather than the [Gmail]-->Drafts folder. Saving the draft 5 times in quick > succession resulted in 5 copies immediately appearing in my inbox. I > switched my account to save drafts in the [Gmail]-->Drafts folder instead > and then watched that folder closely as I saved a new draft in quick > succession. A duplicate (revision) draft would appear and then the previous > version would get deleted immediately, leaving only 1 draft in the Gmail > Drafts folder, and no mystery drafts showed up in my inbox anymore. So, I'm > not even sure why I have two different Drafts folders, but I think this > obviously confuses Gmail as it adds a "Draft" label to each draft that isn't > in the special "Gmail" drafts folder. I'm thinking that the duplicate drafts > folder is a legacy of the old POP3 drafts folder from before I migrated all > my mail to IMAP -- so maybe that's what's been happening with these other > users who are reporting the same problem every few years? Anyway, the > mystery appears to be solved for me at least.
I tried that. I don't seem to have any problem with the drafts folder now. What happens to me is that the drafts appear on the trash folder, like one message per minute, during the time during which I was composing the e-mail. For example, if I was writing an e-mail from 11:34 to 11:39, I'll have around 6 draft messages in trash: one from 11:39, other from 11:40, etc.
I guess that I is because you have set thunder bird to save a draft per minute and sending drafts to trash shouldn't be a problem? I mean that's what I get now and I'm happy
I think auto-save should overwrite the draft message. Moreover, I wouldn't expect to have any message on trash, afterwards, since I didn't delete any message.
I'm no expert but from what I read I think that's precisely it. The auto save feature overwrites therefore deletes previous drafts and that's how they end up I'm trash. For me that's good. What was annoying was to have 22 drafts in a conversation.
This Thunderbird add-on solved this problema (at least in the Android Gmail App) https://bugzilla.mozilla.org/show_bug.cgi?id=562748#c24
I would like to reopen this bug. I frequently change my sender address (subaddressing) before sending a mail and when I do that TB always leaves a message in Drafts (and one in Sent) in GMail. TB seems to lose track of the first draft when I change the From-address.
I second db’s request to reopen this issue. It’s plagued my Gmail account for upwards of one year. However, I don’t change my sender address and the multiple drafts still occurs. The only similarity is that my Gmail account has to sender addresses: a .com and a .systems.

I just use a dummy gmail account to save drafts to. That way the drafts are not mixed in with the "conversation", and I can delete them all in one go, when I'm through with them. - mekineer

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: